<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2017 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------

namespace app\supplier\model;

use think\Model;
use think\Db;

/**
 * 用户
 * @package app\user\model
 */
class UserModel extends Model
{
    // 设置当前模型对应的完整数据表名称
    protected $table = 'e_supplier';
	
	/**
     * 查询账号
     * @param array $where 查询条件
     * @author 郑义生 <1052063941@qq.com>
     * @return mixed
     */
	public function getUser($where)
	{
		return Db::name($this->table)->where($where)->find();
	}
	
	/**
     * 查询供应商车型库权限
     * @param array $where 查询条件
     * @author 郑义生 <1052063941@qq.com>
     * @return mixed
     */
	public function getSupplierRole($where)
	{
		return Db::name('e_supplier_role')->where($where)->select();
	}
}
